import request from '@/utils/request'

export function getIntvInfo(
  page: number,
  pageSize: number,
  studentId: string,
  stuName: string,
  className: string,
  intvDate: Date,
  intvState: string,
  intvScore: number
) {
  return request({
    url:
      '/admin/intv/getIntvInfo?page=' +
      page +
      '&pageSize=' +
      pageSize +
      '&studentId=' +
      studentId +
      '&stuName=' +
      stuName +
      '&className=' +
      className +
      '&intvDate=' +
      intvDate +
      '&intvState=' +
      intvState +
      '&intvScore=' +
      intvScore,
    method: 'get'
  })
}

export function setIntvScore(data: object) {
  return request({
    url: '/admin/intv/setIntvScore',
    method: 'put',
    data: data
  })
}

export function passByIds(ids: number[]) {
  return request({
    url: '/admin/intv/passByIntvIds/' + ids,
    method: 'put'
  })
}

export function noPassByIds(ids: number[]) {
  return request({
    url: '/admin/intv/noPassByIntvIds/' + ids,
    method: 'put'
  })
}
export function ExportIntvInfo(intvState: string, className: string) {
  return request({
    url: '/admin/export/intvTable?intvState=' + intvState + '&className=' + className,
    method: 'get',
    responseType: 'blob'
  })
}
